package cn.ibizlab.odoo.core.odoo_base.service.impl;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.math.BigInteger;
import java.util.Collection;

import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import cn.ibizlab.odoo.core.client.model.Ires_users;
import cn.ibizlab.odoo.core.odoo_base.domain.Res_users;
import cn.ibizlab.odoo.core.odoo_base.filter.Res_usersSearchContext;
import cn.ibizlab.odoo.core.odoo_base.service.IRes_usersService;
import cn.ibizlab.odoo.util.SearchResult;
import cn.ibizlab.odoo.util.log.IBIZLog;

/**
 * 实体[用户] 服务对象接口实现
 */
@Slf4j
@IBIZLog
@Service
public class Res_usersServiceImpl implements IRes_usersService {

    @Autowired
    private cn.ibizlab.odoo.core.client.service.Ires_usersClientService res_usersClientService;

    @Override
    public boolean update(Res_users res_users) {
        boolean bOk = false ;
        Ires_users clientModel = this.convert2Model(res_users,null);
        res_usersClientService.update(clientModel) ;
        this.convert2Domain(clientModel,res_users) ;
        bOk = true;
        return bOk ;
    }

    @Override
    public boolean create(Res_users res_users) {
        boolean bOk = false ;
        Ires_users clientModel = this.convert2Model(res_users,null);
        res_usersClientService.create(clientModel) ;
        this.convert2Domain(clientModel,res_users);
        bOk = true ;

        return bOk ;
    }

    @Override
    public Res_users get(Integer id) {
        Ires_users clientModel = res_usersClientService.createModel();
        clientModel.setId(id);
        res_usersClientService.get(clientModel) ;
        return this.convert2Domain(clientModel,null);
    }

    @Override
    public Res_users get(Res_users res_users) {
        Res_users retres_users = this.get(res_users.getId()) ;
    	BeanCopier copier=BeanCopier.create(retres_users.getClass(), res_users.getClass(), false);
        copier.copy(retres_users, res_users, null);
        return res_users ;
    }

    @Override
    public void updateBatch(List<Res_users> res_userss, int batchSize) {

        //res_usersClientService.updateBatch(res_userss,batchSize) ;

    }

    @Override
    public void createBatch(List<Res_users> res_userss, int batchSize) {

                        //res_usersClientService.createBatch(res_userss,batchSize) ;

    }

    @Override
    public void removeBatch(Collection<? extends Serializable> idList, int batchSize) {

        //res_usersClientService.removeBatch(res_userss) ;

    }

    @Override
    public boolean remove(Integer id) {
        boolean bOk = false ;
        Ires_users clientModel = res_usersClientService.createModel();
        clientModel.setId(id);
        res_usersClientService.remove(clientModel) ;
        bOk = true ;
        return bOk ;
    }

    /**
     * 查询集合 默认查询
     */
    @Override
    public Page<Res_users> searchDefault(Res_usersSearchContext context) {
        List<Res_users> list = new ArrayList<Res_users>();
        Page<cn.ibizlab.odoo.core.client.model.Ires_users> clientModelList = res_usersClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Ires_users clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Res_users>(list, context.getPageable(), clientModelList.getTotalElements());
    }


    /**
     * 根据销售渠道查询
     */
    @Override
    public Page<Res_users> selectByOdoo_sale_team(Integer id){
        Res_usersSearchContext context = new Res_usersSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Res_users> list = new ArrayList<Res_users>();
        Page<cn.ibizlab.odoo.core.client.model.Ires_users> clientModelList = res_usersClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Ires_users clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Res_users>(list, context.getPageable(), clientModelList.getTotalElements());

    }

    /**
     * 根据EMail别名查询
     */
    @Override
    public Page<Res_users> selectByOdoo_alias(Integer id){
        Res_usersSearchContext context = new Res_usersSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Res_users> list = new ArrayList<Res_users>();
        Page<cn.ibizlab.odoo.core.client.model.Ires_users> clientModelList = res_usersClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Ires_users clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Res_users>(list, context.getPageable(), clientModelList.getTotalElements());

    }

    /**
     * 根据公司查询
     */
    @Override
    public Page<Res_users> selectByOdoo_company(Integer id){
        Res_usersSearchContext context = new Res_usersSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Res_users> list = new ArrayList<Res_users>();
        Page<cn.ibizlab.odoo.core.client.model.Ires_users> clientModelList = res_usersClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Ires_users clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Res_users>(list, context.getPageable(), clientModelList.getTotalElements());

    }

    /**
     * 根据联系人查询
     */
    @Override
    public Page<Res_users> selectByOdoo_partner(Integer id){
        Res_usersSearchContext context = new Res_usersSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Res_users> list = new ArrayList<Res_users>();
        Page<cn.ibizlab.odoo.core.client.model.Ires_users> clientModelList = res_usersClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Ires_users clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Res_users>(list, context.getPageable(), clientModelList.getTotalElements());

    }

    /**
     * 根据用户查询
     */
    @Override
    public Page<Res_users> selectByOdoo_create(Integer id){
        Res_usersSearchContext context = new Res_usersSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Res_users> list = new ArrayList<Res_users>();
        Page<cn.ibizlab.odoo.core.client.model.Ires_users> clientModelList = res_usersClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Ires_users clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Res_users>(list, context.getPageable(), clientModelList.getTotalElements());

    }

    /**
     * 根据用户查询
     */
    @Override
    public Page<Res_users> selectByOdoo_write(Integer id){
        Res_usersSearchContext context = new Res_usersSearchContext();
        if(!org.springframework.util.StringUtils.isEmpty(id)){
            cn.ibizlab.odoo.util.SearchFieldFilter fieldFilter=new cn.ibizlab.odoo.util.SearchFieldFilter();
            fieldFilter.setParam("id");
            fieldFilter.setCondition(cn.ibizlab.odoo.util.enums.SearchFieldType.EQ);
            fieldFilter.setValue(id);
            context.getCondition().add(fieldFilter);
        }
        List<Res_users> list = new ArrayList<Res_users>();
        Page<cn.ibizlab.odoo.core.client.model.Ires_users> clientModelList = res_usersClientService.search(context) ;
        for(cn.ibizlab.odoo.core.client.model.Ires_users clientModel : clientModelList){
            list.add( this.convert2Domain(clientModel,null));
        }
        return new PageImpl<Res_users>(list, context.getPageable(), clientModelList.getTotalElements());

    }



    public Ires_users convert2Model(Res_users domain , Ires_users model) {
        if(domain == null)
            return model ;
        if(model==null){
            model = res_usersClientService.createModel() ;
        }

         if(domain.getIs_moderatorDirtyFlag())
            model.setIs_moderator(domain.getIs_moderator());
         if(domain.getResource_idsDirtyFlag())
            model.setResource_ids(domain.getResource_ids());
         if(domain.getCreate_dateDirtyFlag())
            model.setCreate_date(domain.getCreate_date());
         if(domain.getCategory_idDirtyFlag())
            model.setCategory_id(domain.getCategory_id());
         if(domain.getResource_calendar_idDirtyFlag())
            model.setResource_calendar_id(domain.getResource_calendar_id());
         if(domain.getLog_idsDirtyFlag())
            model.setLog_ids(domain.getLog_ids());
         if(domain.getMessage_idsDirtyFlag())
            model.setMessage_ids(domain.getMessage_ids());
         if(domain.getPos_security_pinDirtyFlag())
            model.setPos_security_pin(domain.getPos_security_pin());
         if(domain.getBadge_idsDirtyFlag())
            model.setBadge_ids(domain.getBadge_ids());
         if(domain.getWrite_dateDirtyFlag())
            model.setWrite_date(domain.getWrite_date());
         if(domain.getIdDirtyFlag())
            model.setId(domain.getId());
         if(domain.getCompany_idsDirtyFlag())
            model.setCompany_ids(domain.getCompany_ids());
         if(domain.getChild_idsDirtyFlag())
            model.setChild_ids(domain.getChild_ids());
         if(domain.getTz_offsetDirtyFlag())
            model.setTz_offset(domain.getTz_offset());
         if(domain.getTarget_sales_doneDirtyFlag())
            model.setTarget_sales_done(domain.getTarget_sales_done());
         if(domain.getMessage_partner_idsDirtyFlag())
            model.setMessage_partner_ids(domain.getMessage_partner_ids());
         if(domain.getNotification_typeDirtyFlag())
            model.setNotification_type(domain.getNotification_type());
         if(domain.getActiveDirtyFlag())
            model.setActive(domain.getActive());
         if(domain.getIm_statusDirtyFlag())
            model.setIm_status(domain.getIm_status());
         if(domain.getKarmaDirtyFlag())
            model.setKarma(domain.getKarma());
         if(domain.getWebsite_idDirtyFlag())
            model.setWebsite_id(domain.getWebsite_id());
         if(domain.getActivity_idsDirtyFlag())
            model.setActivity_ids(domain.getActivity_ids());
         if(domain.getGold_badgeDirtyFlag())
            model.setGold_badge(domain.getGold_badge());
         if(domain.getEmployee_idsDirtyFlag())
            model.setEmployee_ids(domain.getEmployee_ids());
         if(domain.getStateDirtyFlag())
            model.setState(domain.getState());
         if(domain.getModeration_channel_idsDirtyFlag())
            model.setModeration_channel_ids(domain.getModeration_channel_ids());
         if(domain.getMessage_channel_idsDirtyFlag())
            model.setMessage_channel_ids(domain.getMessage_channel_ids());
         if(domain.getSilver_badgeDirtyFlag())
            model.setSilver_badge(domain.getSilver_badge());
         if(domain.getPayment_token_idsDirtyFlag())
            model.setPayment_token_ids(domain.getPayment_token_ids());
         if(domain.getDisplay_nameDirtyFlag())
            model.setDisplay_name(domain.getDisplay_name());
         if(domain.getCompanies_countDirtyFlag())
            model.setCompanies_count(domain.getCompanies_count());
         if(domain.getTarget_sales_invoicedDirtyFlag())
            model.setTarget_sales_invoiced(domain.getTarget_sales_invoiced());
         if(domain.getMessage_follower_idsDirtyFlag())
            model.setMessage_follower_ids(domain.getMessage_follower_ids());
         if(domain.getLogin_dateDirtyFlag())
            model.setLogin_date(domain.getLogin_date());
         if(domain.getChannel_idsDirtyFlag())
            model.setChannel_ids(domain.getChannel_ids());
         if(domain.getGroups_idDirtyFlag())
            model.setGroups_id(domain.getGroups_id());
         if(domain.getShareDirtyFlag())
            model.setShare(domain.getShare());
         if(domain.getBank_idsDirtyFlag())
            model.setBank_ids(domain.getBank_ids());
         if(domain.getSale_order_idsDirtyFlag())
            model.setSale_order_ids(domain.getSale_order_ids());
         if(domain.getNew_passwordDirtyFlag())
            model.setNew_password(domain.getNew_password());
         if(domain.getOdoobot_stateDirtyFlag())
            model.setOdoobot_state(domain.getOdoobot_state());
         if(domain.getRef_company_idsDirtyFlag())
            model.setRef_company_ids(domain.getRef_company_ids());
         if(domain.getPasswordDirtyFlag())
            model.setPassword(domain.getPassword());
         if(domain.getBronze_badgeDirtyFlag())
            model.setBronze_badge(domain.getBronze_badge());
         if(domain.getMeeting_idsDirtyFlag())
            model.setMeeting_ids(domain.getMeeting_ids());
         if(domain.get__last_updateDirtyFlag())
            model.set__last_update(domain.get__last_update());
         if(domain.getForum_waiting_posts_countDirtyFlag())
            model.setForum_waiting_posts_count(domain.getForum_waiting_posts_count());
         if(domain.getGoal_idsDirtyFlag())
            model.setGoal_ids(domain.getGoal_ids());
         if(domain.getTarget_sales_wonDirtyFlag())
            model.setTarget_sales_won(domain.getTarget_sales_won());
         if(domain.getWebsite_message_idsDirtyFlag())
            model.setWebsite_message_ids(domain.getWebsite_message_ids());
         if(domain.getAction_idDirtyFlag())
            model.setAction_id(domain.getAction_id());
         if(domain.getLoginDirtyFlag())
            model.setLogin(domain.getLogin());
         if(domain.getContract_idsDirtyFlag())
            model.setContract_ids(domain.getContract_ids());
         if(domain.getModeration_counterDirtyFlag())
            model.setModeration_counter(domain.getModeration_counter());
         if(domain.getSignatureDirtyFlag())
            model.setSignature(domain.getSignature());
         if(domain.getUser_idsDirtyFlag())
            model.setUser_ids(domain.getUser_ids());
         if(domain.getOpportunity_idsDirtyFlag())
            model.setOpportunity_ids(domain.getOpportunity_ids());
         if(domain.getTask_idsDirtyFlag())
            model.setTask_ids(domain.getTask_ids());
         if(domain.getInvoice_idsDirtyFlag())
            model.setInvoice_ids(domain.getInvoice_ids());
         if(domain.getRefDirtyFlag())
            model.setRef(domain.getRef());
         if(domain.getMessage_has_error_counterDirtyFlag())
            model.setMessage_has_error_counter(domain.getMessage_has_error_counter());
         if(domain.getLast_website_so_idDirtyFlag())
            model.setLast_website_so_id(domain.getLast_website_so_id());
         if(domain.getDateDirtyFlag())
            model.setDate(domain.getDate());
         if(domain.getMessage_is_followerDirtyFlag())
            model.setMessage_is_follower(domain.getMessage_is_follower());
         if(domain.getProperty_stock_customerDirtyFlag())
            model.setProperty_stock_customer(domain.getProperty_stock_customer());
         if(domain.getLast_time_entries_checkedDirtyFlag())
            model.setLast_time_entries_checked(domain.getLast_time_entries_checked());
         if(domain.getLangDirtyFlag())
            model.setLang(domain.getLang());
         if(domain.getSale_warnDirtyFlag())
            model.setSale_warn(domain.getSale_warn());
         if(domain.getMeeting_countDirtyFlag())
            model.setMeeting_count(domain.getMeeting_count());
         if(domain.getStreetDirtyFlag())
            model.setStreet(domain.getStreet());
         if(domain.getInvoice_warnDirtyFlag())
            model.setInvoice_warn(domain.getInvoice_warn());
         if(domain.getSignup_tokenDirtyFlag())
            model.setSignup_token(domain.getSignup_token());
         if(domain.getTask_countDirtyFlag())
            model.setTask_count(domain.getTask_count());
         if(domain.getSignup_validDirtyFlag())
            model.setSignup_valid(domain.getSignup_valid());
         if(domain.getMessage_unread_counterDirtyFlag())
            model.setMessage_unread_counter(domain.getMessage_unread_counter());
         if(domain.getSignup_typeDirtyFlag())
            model.setSignup_type(domain.getSignup_type());
         if(domain.getProperty_account_receivable_idDirtyFlag())
            model.setProperty_account_receivable_id(domain.getProperty_account_receivable_id());
         if(domain.getWebsite_meta_og_imgDirtyFlag())
            model.setWebsite_meta_og_img(domain.getWebsite_meta_og_img());
         if(domain.getEvent_countDirtyFlag())
            model.setEvent_count(domain.getEvent_count());
         if(domain.getJournal_item_countDirtyFlag())
            model.setJournal_item_count(domain.getJournal_item_count());
         if(domain.getParent_nameDirtyFlag())
            model.setParent_name(domain.getParent_name());
         if(domain.getSale_team_id_textDirtyFlag())
            model.setSale_team_id_text(domain.getSale_team_id_text());
         if(domain.getCreditDirtyFlag())
            model.setCredit(domain.getCredit());
         if(domain.getOpportunity_countDirtyFlag())
            model.setOpportunity_count(domain.getOpportunity_count());
         if(domain.getSignup_urlDirtyFlag())
            model.setSignup_url(domain.getSignup_url());
         if(domain.getProperty_account_payable_idDirtyFlag())
            model.setProperty_account_payable_id(domain.getProperty_account_payable_id());
         if(domain.getState_idDirtyFlag())
            model.setState_id(domain.getState_id());
         if(domain.getMessage_has_errorDirtyFlag())
            model.setMessage_has_error(domain.getMessage_has_error());
         if(domain.getSale_warn_msgDirtyFlag())
            model.setSale_warn_msg(domain.getSale_warn_msg());
         if(domain.getWebsite_publishedDirtyFlag())
            model.setWebsite_published(domain.getWebsite_published());
         if(domain.getTotal_invoicedDirtyFlag())
            model.setTotal_invoiced(domain.getTotal_invoiced());
         if(domain.getDebitDirtyFlag())
            model.setDebit(domain.getDebit());
         if(domain.getPos_order_countDirtyFlag())
            model.setPos_order_count(domain.getPos_order_count());
         if(domain.getWrite_uid_textDirtyFlag())
            model.setWrite_uid_text(domain.getWrite_uid_text());
         if(domain.getTitleDirtyFlag())
            model.setTitle(domain.getTitle());
         if(domain.getMessage_unreadDirtyFlag())
            model.setMessage_unread(domain.getMessage_unread());
         if(domain.getSupplier_invoice_countDirtyFlag())
            model.setSupplier_invoice_count(domain.getSupplier_invoice_count());
         if(domain.getCityDirtyFlag())
            model.setCity(domain.getCity());
         if(domain.getPicking_warnDirtyFlag())
            model.setPicking_warn(domain.getPicking_warn());
         if(domain.getMessage_main_attachment_idDirtyFlag())
            model.setMessage_main_attachment_id(domain.getMessage_main_attachment_id());
         if(domain.getActivity_user_idDirtyFlag())
            model.setActivity_user_id(domain.getActivity_user_id());
         if(domain.getAdditional_infoDirtyFlag())
            model.setAdditional_info(domain.getAdditional_info());
         if(domain.getIbizfunctionDirtyFlag())
            model.setIbizfunction(domain.getIbizfunction());
         if(domain.getWebsite_urlDirtyFlag())
            model.setWebsite_url(domain.getWebsite_url());
         if(domain.getCalendar_last_notif_ackDirtyFlag())
            model.setCalendar_last_notif_ack(domain.getCalendar_last_notif_ack());
         if(domain.getMessage_needaction_counterDirtyFlag())
            model.setMessage_needaction_counter(domain.getMessage_needaction_counter());
         if(domain.getActivity_date_deadlineDirtyFlag())
            model.setActivity_date_deadline(domain.getActivity_date_deadline());
         if(domain.getEmployeeDirtyFlag())
            model.setEmployee(domain.getEmployee());
         if(domain.getActivity_stateDirtyFlag())
            model.setActivity_state(domain.getActivity_state());
         if(domain.getBarcodeDirtyFlag())
            model.setBarcode(domain.getBarcode());
         if(domain.getPartner_gidDirtyFlag())
            model.setPartner_gid(domain.getPartner_gid());
         if(domain.getTypeDirtyFlag())
            model.setType(domain.getType());
         if(domain.getVatDirtyFlag())
            model.setVat(domain.getVat());
         if(domain.getPurchase_warn_msgDirtyFlag())
            model.setPurchase_warn_msg(domain.getPurchase_warn_msg());
         if(domain.getCommentDirtyFlag())
            model.setComment(domain.getComment());
         if(domain.getSupplierDirtyFlag())
            model.setSupplier(domain.getSupplier());
         if(domain.getWebsite_meta_keywordsDirtyFlag())
            model.setWebsite_meta_keywords(domain.getWebsite_meta_keywords());
         if(domain.getParent_idDirtyFlag())
            model.setParent_id(domain.getParent_id());
         if(domain.getPurchase_warnDirtyFlag())
            model.setPurchase_warn(domain.getPurchase_warn());
         if(domain.getActive_partnerDirtyFlag())
            model.setActive_partner(domain.getActive_partner());
         if(domain.getCurrency_idDirtyFlag())
            model.setCurrency_id(domain.getCurrency_id());
         if(domain.getIndustry_idDirtyFlag())
            model.setIndustry_id(domain.getIndustry_id());
         if(domain.getProperty_stock_supplierDirtyFlag())
            model.setProperty_stock_supplier(domain.getProperty_stock_supplier());
         if(domain.getPayment_token_countDirtyFlag())
            model.setPayment_token_count(domain.getPayment_token_count());
         if(domain.getMessage_needactionDirtyFlag())
            model.setMessage_needaction(domain.getMessage_needaction());
         if(domain.getUser_idDirtyFlag())
            model.setUser_id(domain.getUser_id());
         if(domain.getCustomerDirtyFlag())
            model.setCustomer(domain.getCustomer());
         if(domain.getProperty_payment_term_idDirtyFlag())
            model.setProperty_payment_term_id(domain.getProperty_payment_term_id());
         if(domain.getActivity_type_idDirtyFlag())
            model.setActivity_type_id(domain.getActivity_type_id());
         if(domain.getContracts_countDirtyFlag())
            model.setContracts_count(domain.getContracts_count());
         if(domain.getSelfDirtyFlag())
            model.setSelf(domain.getSelf());
         if(domain.getWebsite_meta_descriptionDirtyFlag())
            model.setWebsite_meta_description(domain.getWebsite_meta_description());
         if(domain.getImageDirtyFlag())
            model.setImage(domain.getImage());
         if(domain.getEmailDirtyFlag())
            model.setEmail(domain.getEmail());
         if(domain.getImage_mediumDirtyFlag())
            model.setImage_medium(domain.getImage_medium());
         if(domain.getActivity_summaryDirtyFlag())
            model.setActivity_summary(domain.getActivity_summary());
         if(domain.getDebit_limitDirtyFlag())
            model.setDebit_limit(domain.getDebit_limit());
         if(domain.getCountry_idDirtyFlag())
            model.setCountry_id(domain.getCountry_id());
         if(domain.getCredit_limitDirtyFlag())
            model.setCredit_limit(domain.getCredit_limit());
         if(domain.getCommercial_company_nameDirtyFlag())
            model.setCommercial_company_name(domain.getCommercial_company_name());
         if(domain.getInvoice_warn_msgDirtyFlag())
            model.setInvoice_warn_msg(domain.getInvoice_warn_msg());
         if(domain.getIs_publishedDirtyFlag())
            model.setIs_published(domain.getIs_published());
         if(domain.getTrustDirtyFlag())
            model.setTrust(domain.getTrust());
         if(domain.getMobileDirtyFlag())
            model.setMobile(domain.getMobile());
         if(domain.getEmail_formattedDirtyFlag())
            model.setEmail_formatted(domain.getEmail_formatted());
         if(domain.getIs_companyDirtyFlag())
            model.setIs_company(domain.getIs_company());
         if(domain.getCreate_uid_textDirtyFlag())
            model.setCreate_uid_text(domain.getCreate_uid_text());
         if(domain.getTeam_idDirtyFlag())
            model.setTeam_id(domain.getTeam_id());
         if(domain.getIs_blacklistedDirtyFlag())
            model.setIs_blacklisted(domain.getIs_blacklisted());
         if(domain.getBank_account_countDirtyFlag())
            model.setBank_account_count(domain.getBank_account_count());
         if(domain.getProperty_product_pricelistDirtyFlag())
            model.setProperty_product_pricelist(domain.getProperty_product_pricelist());
         if(domain.getNameDirtyFlag())
            model.setName(domain.getName());
         if(domain.getPicking_warn_msgDirtyFlag())
            model.setPicking_warn_msg(domain.getPicking_warn_msg());
         if(domain.getMessage_attachment_countDirtyFlag())
            model.setMessage_attachment_count(domain.getMessage_attachment_count());
         if(domain.getWebsiteDirtyFlag())
            model.setWebsite(domain.getWebsite());
         if(domain.getPhoneDirtyFlag())
            model.setPhone(domain.getPhone());
         if(domain.getStreet2DirtyFlag())
            model.setStreet2(domain.getStreet2());
         if(domain.getHas_unreconciled_entriesDirtyFlag())
            model.setHas_unreconciled_entries(domain.getHas_unreconciled_entries());
         if(domain.getSignup_expirationDirtyFlag())
            model.setSignup_expiration(domain.getSignup_expiration());
         if(domain.getTzDirtyFlag())
            model.setTz(domain.getTz());
         if(domain.getContact_addressDirtyFlag())
            model.setContact_address(domain.getContact_address());
         if(domain.getWebsite_short_descriptionDirtyFlag())
            model.setWebsite_short_description(domain.getWebsite_short_description());
         if(domain.getPartner_shareDirtyFlag())
            model.setPartner_share(domain.getPartner_share());
         if(domain.getCompany_id_textDirtyFlag())
            model.setCompany_id_text(domain.getCompany_id_text());
         if(domain.getColorDirtyFlag())
            model.setColor(domain.getColor());
         if(domain.getZipDirtyFlag())
            model.setZip(domain.getZip());
         if(domain.getSale_order_countDirtyFlag())
            model.setSale_order_count(domain.getSale_order_count());
         if(domain.getCompany_typeDirtyFlag())
            model.setCompany_type(domain.getCompany_type());
         if(domain.getProperty_account_position_idDirtyFlag())
            model.setProperty_account_position_id(domain.getProperty_account_position_id());
         if(domain.getIs_seo_optimizedDirtyFlag())
            model.setIs_seo_optimized(domain.getIs_seo_optimized());
         if(domain.getMessage_bounceDirtyFlag())
            model.setMessage_bounce(domain.getMessage_bounce());
         if(domain.getWebsite_meta_titleDirtyFlag())
            model.setWebsite_meta_title(domain.getWebsite_meta_title());
         if(domain.getImage_smallDirtyFlag())
            model.setImage_small(domain.getImage_small());
         if(domain.getProperty_purchase_currency_idDirtyFlag())
            model.setProperty_purchase_currency_id(domain.getProperty_purchase_currency_id());
         if(domain.getPurchase_order_countDirtyFlag())
            model.setPurchase_order_count(domain.getPurchase_order_count());
         if(domain.getWebsite_descriptionDirtyFlag())
            model.setWebsite_description(domain.getWebsite_description());
         if(domain.getProperty_supplier_payment_term_idDirtyFlag())
            model.setProperty_supplier_payment_term_id(domain.getProperty_supplier_payment_term_id());
         if(domain.getCommercial_partner_idDirtyFlag())
            model.setCommercial_partner_id(domain.getCommercial_partner_id());
         if(domain.getAlias_contactDirtyFlag())
            model.setAlias_contact(domain.getAlias_contact());
         if(domain.getCompany_nameDirtyFlag())
            model.setCompany_name(domain.getCompany_name());
         if(domain.getCompany_idDirtyFlag())
            model.setCompany_id(domain.getCompany_id());
         if(domain.getPartner_idDirtyFlag())
            model.setPartner_id(domain.getPartner_id());
         if(domain.getAlias_idDirtyFlag())
            model.setAlias_id(domain.getAlias_id());
         if(domain.getSale_team_idDirtyFlag())
            model.setSale_team_id(domain.getSale_team_id());
         if(domain.getWrite_uidDirtyFlag())
            model.setWrite_uid(domain.getWrite_uid());
         if(domain.getCreate_uidDirtyFlag())
            model.setCreate_uid(domain.getCreate_uid());
        return model ;
    }

    public Res_users convert2Domain( Ires_users model ,Res_users domain) {
        if(model == null)
            return domain ;
        if(domain == null){
            domain = new Res_users();
        }

        if(model.getIs_moderatorDirtyFlag())
            domain.setIs_moderator(model.getIs_moderator());
        if(model.getResource_idsDirtyFlag())
            domain.setResource_ids(model.getResource_ids());
        if(model.getCreate_dateDirtyFlag())
            domain.setCreate_date(model.getCreate_date());
        if(model.getCategory_idDirtyFlag())
            domain.setCategory_id(model.getCategory_id());
        if(model.getResource_calendar_idDirtyFlag())
            domain.setResource_calendar_id(model.getResource_calendar_id());
        if(model.getLog_idsDirtyFlag())
            domain.setLog_ids(model.getLog_ids());
        if(model.getMessage_idsDirtyFlag())
            domain.setMessage_ids(model.getMessage_ids());
        if(model.getPos_security_pinDirtyFlag())
            domain.setPos_security_pin(model.getPos_security_pin());
        if(model.getBadge_idsDirtyFlag())
            domain.setBadge_ids(model.getBadge_ids());
        if(model.getWrite_dateDirtyFlag())
            domain.setWrite_date(model.getWrite_date());
        if(model.getIdDirtyFlag())
            domain.setId(model.getId());
        if(model.getCompany_idsDirtyFlag())
            domain.setCompany_ids(model.getCompany_ids());
        if(model.getChild_idsDirtyFlag())
            domain.setChild_ids(model.getChild_ids());
        if(model.getTz_offsetDirtyFlag())
            domain.setTz_offset(model.getTz_offset());
        if(model.getTarget_sales_doneDirtyFlag())
            domain.setTarget_sales_done(model.getTarget_sales_done());
        if(model.getMessage_partner_idsDirtyFlag())
            domain.setMessage_partner_ids(model.getMessage_partner_ids());
        if(model.getNotification_typeDirtyFlag())
            domain.setNotification_type(model.getNotification_type());
        if(model.getActiveDirtyFlag())
            domain.setActive(model.getActive());
        if(model.getIm_statusDirtyFlag())
            domain.setIm_status(model.getIm_status());
        if(model.getKarmaDirtyFlag())
            domain.setKarma(model.getKarma());
        if(model.getWebsite_idDirtyFlag())
            domain.setWebsite_id(model.getWebsite_id());
        if(model.getActivity_idsDirtyFlag())
            domain.setActivity_ids(model.getActivity_ids());
        if(model.getGold_badgeDirtyFlag())
            domain.setGold_badge(model.getGold_badge());
        if(model.getEmployee_idsDirtyFlag())
            domain.setEmployee_ids(model.getEmployee_ids());
        if(model.getStateDirtyFlag())
            domain.setState(model.getState());
        if(model.getModeration_channel_idsDirtyFlag())
            domain.setModeration_channel_ids(model.getModeration_channel_ids());
        if(model.getMessage_channel_idsDirtyFlag())
            domain.setMessage_channel_ids(model.getMessage_channel_ids());
        if(model.getSilver_badgeDirtyFlag())
            domain.setSilver_badge(model.getSilver_badge());
        if(model.getPayment_token_idsDirtyFlag())
            domain.setPayment_token_ids(model.getPayment_token_ids());
        if(model.getDisplay_nameDirtyFlag())
            domain.setDisplay_name(model.getDisplay_name());
        if(model.getCompanies_countDirtyFlag())
            domain.setCompanies_count(model.getCompanies_count());
        if(model.getTarget_sales_invoicedDirtyFlag())
            domain.setTarget_sales_invoiced(model.getTarget_sales_invoiced());
        if(model.getMessage_follower_idsDirtyFlag())
            domain.setMessage_follower_ids(model.getMessage_follower_ids());
        if(model.getLogin_dateDirtyFlag())
            domain.setLogin_date(model.getLogin_date());
        if(model.getChannel_idsDirtyFlag())
            domain.setChannel_ids(model.getChannel_ids());
        if(model.getGroups_idDirtyFlag())
            domain.setGroups_id(model.getGroups_id());
        if(model.getShareDirtyFlag())
            domain.setShare(model.getShare());
        if(model.getBank_idsDirtyFlag())
            domain.setBank_ids(model.getBank_ids());
        if(model.getSale_order_idsDirtyFlag())
            domain.setSale_order_ids(model.getSale_order_ids());
        if(model.getNew_passwordDirtyFlag())
            domain.setNew_password(model.getNew_password());
        if(model.getOdoobot_stateDirtyFlag())
            domain.setOdoobot_state(model.getOdoobot_state());
        if(model.getRef_company_idsDirtyFlag())
            domain.setRef_company_ids(model.getRef_company_ids());
        if(model.getPasswordDirtyFlag())
            domain.setPassword(model.getPassword());
        if(model.getBronze_badgeDirtyFlag())
            domain.setBronze_badge(model.getBronze_badge());
        if(model.getMeeting_idsDirtyFlag())
            domain.setMeeting_ids(model.getMeeting_ids());
        if(model.get__last_updateDirtyFlag())
            domain.set__last_update(model.get__last_update());
        if(model.getForum_waiting_posts_countDirtyFlag())
            domain.setForum_waiting_posts_count(model.getForum_waiting_posts_count());
        if(model.getGoal_idsDirtyFlag())
            domain.setGoal_ids(model.getGoal_ids());
        if(model.getTarget_sales_wonDirtyFlag())
            domain.setTarget_sales_won(model.getTarget_sales_won());
        if(model.getWebsite_message_idsDirtyFlag())
            domain.setWebsite_message_ids(model.getWebsite_message_ids());
        if(model.getAction_idDirtyFlag())
            domain.setAction_id(model.getAction_id());
        if(model.getLoginDirtyFlag())
            domain.setLogin(model.getLogin());
        if(model.getContract_idsDirtyFlag())
            domain.setContract_ids(model.getContract_ids());
        if(model.getModeration_counterDirtyFlag())
            domain.setModeration_counter(model.getModeration_counter());
        if(model.getSignatureDirtyFlag())
            domain.setSignature(model.getSignature());
        if(model.getUser_idsDirtyFlag())
            domain.setUser_ids(model.getUser_ids());
        if(model.getOpportunity_idsDirtyFlag())
            domain.setOpportunity_ids(model.getOpportunity_ids());
        if(model.getTask_idsDirtyFlag())
            domain.setTask_ids(model.getTask_ids());
        if(model.getInvoice_idsDirtyFlag())
            domain.setInvoice_ids(model.getInvoice_ids());
        if(model.getRefDirtyFlag())
            domain.setRef(model.getRef());
        if(model.getMessage_has_error_counterDirtyFlag())
            domain.setMessage_has_error_counter(model.getMessage_has_error_counter());
        if(model.getLast_website_so_idDirtyFlag())
            domain.setLast_website_so_id(model.getLast_website_so_id());
        if(model.getDateDirtyFlag())
            domain.setDate(model.getDate());
        if(model.getMessage_is_followerDirtyFlag())
            domain.setMessage_is_follower(model.getMessage_is_follower());
        if(model.getProperty_stock_customerDirtyFlag())
            domain.setProperty_stock_customer(model.getProperty_stock_customer());
        if(model.getLast_time_entries_checkedDirtyFlag())
            domain.setLast_time_entries_checked(model.getLast_time_entries_checked());
        if(model.getLangDirtyFlag())
            domain.setLang(model.getLang());
        if(model.getSale_warnDirtyFlag())
            domain.setSale_warn(model.getSale_warn());
        if(model.getMeeting_countDirtyFlag())
            domain.setMeeting_count(model.getMeeting_count());
        if(model.getStreetDirtyFlag())
            domain.setStreet(model.getStreet());
        if(model.getInvoice_warnDirtyFlag())
            domain.setInvoice_warn(model.getInvoice_warn());
        if(model.getSignup_tokenDirtyFlag())
            domain.setSignup_token(model.getSignup_token());
        if(model.getTask_countDirtyFlag())
            domain.setTask_count(model.getTask_count());
        if(model.getSignup_validDirtyFlag())
            domain.setSignup_valid(model.getSignup_valid());
        if(model.getMessage_unread_counterDirtyFlag())
            domain.setMessage_unread_counter(model.getMessage_unread_counter());
        if(model.getSignup_typeDirtyFlag())
            domain.setSignup_type(model.getSignup_type());
        if(model.getProperty_account_receivable_idDirtyFlag())
            domain.setProperty_account_receivable_id(model.getProperty_account_receivable_id());
        if(model.getWebsite_meta_og_imgDirtyFlag())
            domain.setWebsite_meta_og_img(model.getWebsite_meta_og_img());
        if(model.getEvent_countDirtyFlag())
            domain.setEvent_count(model.getEvent_count());
        if(model.getJournal_item_countDirtyFlag())
            domain.setJournal_item_count(model.getJournal_item_count());
        if(model.getParent_nameDirtyFlag())
            domain.setParent_name(model.getParent_name());
        if(model.getSale_team_id_textDirtyFlag())
            domain.setSale_team_id_text(model.getSale_team_id_text());
        if(model.getCreditDirtyFlag())
            domain.setCredit(model.getCredit());
        if(model.getOpportunity_countDirtyFlag())
            domain.setOpportunity_count(model.getOpportunity_count());
        if(model.getSignup_urlDirtyFlag())
            domain.setSignup_url(model.getSignup_url());
        if(model.getProperty_account_payable_idDirtyFlag())
            domain.setProperty_account_payable_id(model.getProperty_account_payable_id());
        if(model.getState_idDirtyFlag())
            domain.setState_id(model.getState_id());
        if(model.getMessage_has_errorDirtyFlag())
            domain.setMessage_has_error(model.getMessage_has_error());
        if(model.getSale_warn_msgDirtyFlag())
            domain.setSale_warn_msg(model.getSale_warn_msg());
        if(model.getWebsite_publishedDirtyFlag())
            domain.setWebsite_published(model.getWebsite_published());
        if(model.getTotal_invoicedDirtyFlag())
            domain.setTotal_invoiced(model.getTotal_invoiced());
        if(model.getDebitDirtyFlag())
            domain.setDebit(model.getDebit());
        if(model.getPos_order_countDirtyFlag())
            domain.setPos_order_count(model.getPos_order_count());
        if(model.getWrite_uid_textDirtyFlag())
            domain.setWrite_uid_text(model.getWrite_uid_text());
        if(model.getTitleDirtyFlag())
            domain.setTitle(model.getTitle());
        if(model.getMessage_unreadDirtyFlag())
            domain.setMessage_unread(model.getMessage_unread());
        if(model.getSupplier_invoice_countDirtyFlag())
            domain.setSupplier_invoice_count(model.getSupplier_invoice_count());
        if(model.getCityDirtyFlag())
            domain.setCity(model.getCity());
        if(model.getPicking_warnDirtyFlag())
            domain.setPicking_warn(model.getPicking_warn());
        if(model.getMessage_main_attachment_idDirtyFlag())
            domain.setMessage_main_attachment_id(model.getMessage_main_attachment_id());
        if(model.getActivity_user_idDirtyFlag())
            domain.setActivity_user_id(model.getActivity_user_id());
        if(model.getAdditional_infoDirtyFlag())
            domain.setAdditional_info(model.getAdditional_info());
        if(model.getIbizfunctionDirtyFlag())
            domain.setIbizfunction(model.getIbizfunction());
        if(model.getWebsite_urlDirtyFlag())
            domain.setWebsite_url(model.getWebsite_url());
        if(model.getCalendar_last_notif_ackDirtyFlag())
            domain.setCalendar_last_notif_ack(model.getCalendar_last_notif_ack());
        if(model.getMessage_needaction_counterDirtyFlag())
            domain.setMessage_needaction_counter(model.getMessage_needaction_counter());
        if(model.getActivity_date_deadlineDirtyFlag())
            domain.setActivity_date_deadline(model.getActivity_date_deadline());
        if(model.getEmployeeDirtyFlag())
            domain.setEmployee(model.getEmployee());
        if(model.getActivity_stateDirtyFlag())
            domain.setActivity_state(model.getActivity_state());
        if(model.getBarcodeDirtyFlag())
            domain.setBarcode(model.getBarcode());
        if(model.getPartner_gidDirtyFlag())
            domain.setPartner_gid(model.getPartner_gid());
        if(model.getTypeDirtyFlag())
            domain.setType(model.getType());
        if(model.getVatDirtyFlag())
            domain.setVat(model.getVat());
        if(model.getPurchase_warn_msgDirtyFlag())
            domain.setPurchase_warn_msg(model.getPurchase_warn_msg());
        if(model.getCommentDirtyFlag())
            domain.setComment(model.getComment());
        if(model.getSupplierDirtyFlag())
            domain.setSupplier(model.getSupplier());
        if(model.getWebsite_meta_keywordsDirtyFlag())
            domain.setWebsite_meta_keywords(model.getWebsite_meta_keywords());
        if(model.getParent_idDirtyFlag())
            domain.setParent_id(model.getParent_id());
        if(model.getPurchase_warnDirtyFlag())
            domain.setPurchase_warn(model.getPurchase_warn());
        if(model.getActive_partnerDirtyFlag())
            domain.setActive_partner(model.getActive_partner());
        if(model.getCurrency_idDirtyFlag())
            domain.setCurrency_id(model.getCurrency_id());
        if(model.getIndustry_idDirtyFlag())
            domain.setIndustry_id(model.getIndustry_id());
        if(model.getProperty_stock_supplierDirtyFlag())
            domain.setProperty_stock_supplier(model.getProperty_stock_supplier());
        if(model.getPayment_token_countDirtyFlag())
            domain.setPayment_token_count(model.getPayment_token_count());
        if(model.getMessage_needactionDirtyFlag())
            domain.setMessage_needaction(model.getMessage_needaction());
        if(model.getUser_idDirtyFlag())
            domain.setUser_id(model.getUser_id());
        if(model.getCustomerDirtyFlag())
            domain.setCustomer(model.getCustomer());
        if(model.getProperty_payment_term_idDirtyFlag())
            domain.setProperty_payment_term_id(model.getProperty_payment_term_id());
        if(model.getActivity_type_idDirtyFlag())
            domain.setActivity_type_id(model.getActivity_type_id());
        if(model.getContracts_countDirtyFlag())
            domain.setContracts_count(model.getContracts_count());
        if(model.getSelfDirtyFlag())
            domain.setSelf(model.getSelf());
        if(model.getWebsite_meta_descriptionDirtyFlag())
            domain.setWebsite_meta_description(model.getWebsite_meta_description());
        if(model.getImageDirtyFlag())
            domain.setImage(model.getImage());
        if(model.getEmailDirtyFlag())
            domain.setEmail(model.getEmail());
        if(model.getImage_mediumDirtyFlag())
            domain.setImage_medium(model.getImage_medium());
        if(model.getActivity_summaryDirtyFlag())
            domain.setActivity_summary(model.getActivity_summary());
        if(model.getDebit_limitDirtyFlag())
            domain.setDebit_limit(model.getDebit_limit());
        if(model.getCountry_idDirtyFlag())
            domain.setCountry_id(model.getCountry_id());
        if(model.getCredit_limitDirtyFlag())
            domain.setCredit_limit(model.getCredit_limit());
        if(model.getCommercial_company_nameDirtyFlag())
            domain.setCommercial_company_name(model.getCommercial_company_name());
        if(model.getInvoice_warn_msgDirtyFlag())
            domain.setInvoice_warn_msg(model.getInvoice_warn_msg());
        if(model.getIs_publishedDirtyFlag())
            domain.setIs_published(model.getIs_published());
        if(model.getTrustDirtyFlag())
            domain.setTrust(model.getTrust());
        if(model.getMobileDirtyFlag())
            domain.setMobile(model.getMobile());
        if(model.getEmail_formattedDirtyFlag())
            domain.setEmail_formatted(model.getEmail_formatted());
        if(model.getIs_companyDirtyFlag())
            domain.setIs_company(model.getIs_company());
        if(model.getCreate_uid_textDirtyFlag())
            domain.setCreate_uid_text(model.getCreate_uid_text());
        if(model.getTeam_idDirtyFlag())
            domain.setTeam_id(model.getTeam_id());
        if(model.getIs_blacklistedDirtyFlag())
            domain.setIs_blacklisted(model.getIs_blacklisted());
        if(model.getBank_account_countDirtyFlag())
            domain.setBank_account_count(model.getBank_account_count());
        if(model.getProperty_product_pricelistDirtyFlag())
            domain.setProperty_product_pricelist(model.getProperty_product_pricelist());
        if(model.getNameDirtyFlag())
            domain.setName(model.getName());
        if(model.getPicking_warn_msgDirtyFlag())
            domain.setPicking_warn_msg(model.getPicking_warn_msg());
        if(model.getMessage_attachment_countDirtyFlag())
            domain.setMessage_attachment_count(model.getMessage_attachment_count());
        if(model.getWebsiteDirtyFlag())
            domain.setWebsite(model.getWebsite());
        if(model.getPhoneDirtyFlag())
            domain.setPhone(model.getPhone());
        if(model.getStreet2DirtyFlag())
            domain.setStreet2(model.getStreet2());
        if(model.getHas_unreconciled_entriesDirtyFlag())
            domain.setHas_unreconciled_entries(model.getHas_unreconciled_entries());
        if(model.getSignup_expirationDirtyFlag())
            domain.setSignup_expiration(model.getSignup_expiration());
        if(model.getTzDirtyFlag())
            domain.setTz(model.getTz());
        if(model.getContact_addressDirtyFlag())
            domain.setContact_address(model.getContact_address());
        if(model.getWebsite_short_descriptionDirtyFlag())
            domain.setWebsite_short_description(model.getWebsite_short_description());
        if(model.getPartner_shareDirtyFlag())
            domain.setPartner_share(model.getPartner_share());
        if(model.getCompany_id_textDirtyFlag())
            domain.setCompany_id_text(model.getCompany_id_text());
        if(model.getColorDirtyFlag())
            domain.setColor(model.getColor());
        if(model.getZipDirtyFlag())
            domain.setZip(model.getZip());
        if(model.getSale_order_countDirtyFlag())
            domain.setSale_order_count(model.getSale_order_count());
        if(model.getCompany_typeDirtyFlag())
            domain.setCompany_type(model.getCompany_type());
        if(model.getProperty_account_position_idDirtyFlag())
            domain.setProperty_account_position_id(model.getProperty_account_position_id());
        if(model.getIs_seo_optimizedDirtyFlag())
            domain.setIs_seo_optimized(model.getIs_seo_optimized());
        if(model.getMessage_bounceDirtyFlag())
            domain.setMessage_bounce(model.getMessage_bounce());
        if(model.getWebsite_meta_titleDirtyFlag())
            domain.setWebsite_meta_title(model.getWebsite_meta_title());
        if(model.getImage_smallDirtyFlag())
            domain.setImage_small(model.getImage_small());
        if(model.getProperty_purchase_currency_idDirtyFlag())
            domain.setProperty_purchase_currency_id(model.getProperty_purchase_currency_id());
        if(model.getPurchase_order_countDirtyFlag())
            domain.setPurchase_order_count(model.getPurchase_order_count());
        if(model.getWebsite_descriptionDirtyFlag())
            domain.setWebsite_description(model.getWebsite_description());
        if(model.getProperty_supplier_payment_term_idDirtyFlag())
            domain.setProperty_supplier_payment_term_id(model.getProperty_supplier_payment_term_id());
        if(model.getCommercial_partner_idDirtyFlag())
            domain.setCommercial_partner_id(model.getCommercial_partner_id());
        if(model.getAlias_contactDirtyFlag())
            domain.setAlias_contact(model.getAlias_contact());
        if(model.getCompany_nameDirtyFlag())
            domain.setCompany_name(model.getCompany_name());
        if(model.getCompany_idDirtyFlag())
            domain.setCompany_id(model.getCompany_id());
        if(model.getPartner_idDirtyFlag())
            domain.setPartner_id(model.getPartner_id());
        if(model.getAlias_idDirtyFlag())
            domain.setAlias_id(model.getAlias_id());
        if(model.getSale_team_idDirtyFlag())
            domain.setSale_team_id(model.getSale_team_id());
        if(model.getWrite_uidDirtyFlag())
            domain.setWrite_uid(model.getWrite_uid());
        if(model.getCreate_uidDirtyFlag())
            domain.setCreate_uid(model.getCreate_uid());
        return domain ;
    }


}
